<%@page import="cn.yunhe.entity.Order"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	<%@ page import="cn.yunhe.entity.Goods,cn.yunhe.entity.Order,java.util.*" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>el表达式</title>
</head>
<body>
	<%
		pageContext.setAttribute("username","juni");
	request.setAttribute("age", 12);
	session.setAttribute("sex", "male");
	application.setAttribute("weight", 120);
	%>
	page:${pageScope.username }<br/>
	request:${requestScope.age }<br/>
	session:${sessionScope.sex }<br/>
	application:${applicationScope.weight }<br/>
	<hr/>
	
	<%
	    Order order = new Order();
	List<Goods> goodslist = new ArrayList<Goods>();
	goodslist.add(new Goods(1,"羊毛",12.5));
	goodslist.add(new Goods(2,"鹅毛",200.6));
	goodslist.add(new Goods(3,"鸭毛",80.8));
	order.setGoodslist(goodslist);
	request.setAttribute("order", order);
	
	%>
	羊毛的价格是：${requestScope.order.goodslist[0] };
	<hr/>
	<%
	  Map<String,String> map = new HashMap<String,String>();
	map.put("size", "xxl");
	map.put("price", "360");
	request.setAttribute("map", map);
	%>
	size:${requestScope.map.get("size") }
	price:${requestScope.map.get("price") }
	<hr/>
	<%
	  String[] arr = new String[10];
	arr[0] = "a";
	arr[1] = "b";
	request.setAttribute("arr", arr);
	%>
	0:${requestScope.arr[0] }
	<hr/>
	${empty arr }
	
</body>
</html>